Namespace - LJCTextDataReaderLib
Parameters
lines - The lines.
fieldDelimiter - The field delimiter.
Syntax
C# |
public Void LJCSetLines(String[] lines, Char fieldDelimiter = ,)
|
Set the source line string array.
(RE)
Remarks
A string array can be loaded by the program and read instead
of a file. Use the LJCReadLine() method to read through the array
instead of the Read() method that is used for a file.
Example
C# |
using LJCTextDataReaderLib;
TextDataReader textReader = new TextDataReader();
string[] lines = new string[]
{
"FirstName, LastName",
"John, Doe",
"Jane, Doe"
};
textReader.LJCSetLines(lines);
while(textReader.ReadLine())
{
for int index = 0; index < textReader.FieldCount; index++)
{
string data = textReader.GetString(index);
}
}
|
Copyright © Lester J. Clark and Contributors.
Licensed under the MIT License.